﻿<%@ Page Title="Usuários" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
    CodeBehind="Usuarios.aspx.cs" Inherits="Follow.Adm.Usuarios" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div class="Titulo">
        <%: Title %><br />
        <asp:Image ID="imgTitulo" runat="server" ImageUrl="~/images/linhas_17.png" />
    </div>
    <asp:MultiView ID="mvUsuarios" runat="server" ActiveViewIndex="0">
        <asp:View ID="View1" runat="server">
            <div class="subTitulo">
                <asp:Label ID="lblTitulo1" runat="server" Text="Lista de Usuários" />
            </div>  
            <div id="divMsg1" class="isa_info" runat="server" visible="false" >
                <asp:Label ID="lblMsg1" runat="server" Text="Mensagem." />
            </div>
            <center>
                <asp:Label ID="lblPesquisa" Text="Pesquisa:" runat="server" /><br />
                <asp:TextBox ID="txtPesquisa" runat="server" Width="300px" /><br />
                <asp:Button ID="btnPesquisa" runat="server" Text="Pesquisar" OnClick="btnPesquisa_Click"
                    CssClass="Botao" />
                <asp:Button ID="btnIncluir" runat="server" Text="Incluir" OnClick="btnIncluir_Click"
                    CssClass="Botao" /><br />
            </center>
            <br />
            <br />
            <asp:GridView ID="gvUsuarios" runat="server" AllowPaging="True" AutoGenerateColumns="False"
                DataKeyNames="IDUsuario" OnRowCommand="gvUsuarios_RowCommand" Width="765px" BackColor="White"
                BorderColor="#DEDFDE" BorderStyle="None" BorderWidth="1px" CellPadding="4" ForeColor="Black"
                GridLines="Vertical" OnPageIndexChanging="gvUsuarios_PageIndexChanging">
                <AlternatingRowStyle BackColor="White" />
                <Columns>
                    <asp:BoundField HeaderText="Usuario" DataField="Nome" />
                    <asp:BoundField HeaderText="Email" DataField="Email" />
                    <asp:BoundField HeaderText="Login" DataField="Login" />
                    <asp:ButtonField ButtonType="image" ImageUrl="~/Images/editar.png" CommandName="Editar"
                        HeaderText="Editar" ItemStyle-HorizontalAlign="Center" />
                    <asp:ButtonField ButtonType="image" ImageUrl="~/Images/excluir.png" CommandName="Excluir"
                        HeaderText="Excluir" ItemStyle-HorizontalAlign="Center" />
                </Columns>
                <FooterStyle BackColor="#CCCC99" />
                <HeaderStyle BackColor="#6B696B" Font-Bold="True" ForeColor="White" />
                <PagerStyle BackColor="#F7F7DE" ForeColor="Black" HorizontalAlign="Right" />
                <RowStyle BackColor="#F7F7DE" />
                <SelectedRowStyle BackColor="#CE5D5A" Font-Bold="True" ForeColor="White" />
                <SortedAscendingCellStyle BackColor="#FBFBF2" />
                <SortedAscendingHeaderStyle BackColor="#848384" />
                <SortedDescendingCellStyle BackColor="#EAEAD3" />
                <SortedDescendingHeaderStyle BackColor="#575357" />
            </asp:GridView>
        </asp:View>
        <asp:View ID="View2" runat="server">
            <div class="subTitulo">
                <asp:Label ID="lblTitulo2" runat="server" Text="Editar Usuário" />
            </div>  
            <div id="divMsg2" class="isa_info" runat="server" visible="false" >
                <asp:Label ID="lblMsg2" runat="server" Text="Mensagem." />
            </div>
            <asp:HiddenField ID="IDUsuario" runat="server" />
            <asp:Label ID="lblNome" runat="server" Text="Nome:" />
            <br />
            <asp:TextBox ID="txtNome" runat="server" />
            <asp:RequiredFieldValidator ID="rfvNome" runat="server" ErrorMessage="* Campo Nome não preenchido."
                ForeColor="Red" ControlToValidate="txtNome" Font-Size="X-Small"></asp:RequiredFieldValidator>
            <br />
            <br />
            <asp:Label ID="lblEmail" runat="server" Text="E-mail:" />
            <br />
            <asp:TextBox ID="txtEmail" runat="server" />
            <asp:RequiredFieldValidator ID="rfvEmail" runat="server" ErrorMessage="* Campo Email não preenchido."
                ForeColor="Red" ControlToValidate="txtEmail" Font-Size="X-Small"></asp:RequiredFieldValidator>
            <asp:RegularExpressionValidator ID="revEmail" runat="server" ControlToValidate="txtEmail"
                ErrorMessage="*Inválido!" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*">
            </asp:RegularExpressionValidator>
            <br />
            <br />
            <asp:Label ID="lblLogin" runat="server" Text="Login:" />
            <br />
            <asp:TextBox ID="txtLogin" runat="server" />
            <asp:RequiredFieldValidator ID="rfvLogin" runat="server" ErrorMessage="* Campo Login não preenchido."
                ForeColor="Red" ControlToValidate="txtLogin" Font-Size="X-Small"></asp:RequiredFieldValidator>
            <br />
            <br />
            <asp:Label ID="lblSenha" runat="server" Text="Senha:" />
            <br />
            <asp:TextBox ID="txtSenha" runat="server" TextMode="Password" />
            <asp:RequiredFieldValidator ID="rfvSenha" runat="server" ErrorMessage="* Campo Senha não preenchido."
                ForeColor="Red" ControlToValidate="txtSenha" Font-Size="X-Small"></asp:RequiredFieldValidator>
            <br />
            <br />
            <asp:Label ID="lblConfirmaSenha" runat="server" Text="Confirme a Senha:" />
            <br />
            <asp:TextBox ID="txtConfirmaSenha" runat="server" TextMode="Password" />
            <asp:RequiredFieldValidator ID="rfvConfirma" runat="server" ErrorMessage="* Campo Confirmar Senha não preenchido."
                ForeColor="Red" ControlToValidate="txtConfirmaSenha" Font-Size="X-Small"></asp:RequiredFieldValidator>
            <br />
            <br />
            <asp:Label ID="lblGrupo" runat="server" Text="Grupo:" />
            <br />
            <asp:DropDownList ID="ddlGrupo" runat="server">
            </asp:DropDownList>
            <br />
            <br />
            <asp:Button ID="btnSalvar" runat="server" Text="Salvar" OnClick="btnSalvar_Click"
                CssClass="Botao" />
            <asp:Button ID="btnVoltar" runat="server" Text="Voltar" OnClick="btnVoltar_Click"
                CssClass="Botao" CausesValidation="false" />
            <br />
        </asp:View>
    </asp:MultiView>
</asp:Content>
